package com.iotechn.unimall.app.api.enterprise;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.EnterpriseImageDO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * Created by rize on 2019/7/1.
 */
@HttpOpenApi(group = "enterprise", description = "企业信息")
public interface EnterpriseService {

    @HttpMethod(description = "获取企业信息")
    public String info(
            @HttpParam(name = "lng", type = HttpParamType.COMMON, description = "经度", valueDef = "116.3") String lng,
            @HttpParam(name = "lat", type = HttpParamType.COMMON, description = "纬度", valueDef = "39.9") String lat,
            @HttpParam(name = "ip", type = HttpParamType.COMMON, description = "ip") String ip) throws ExecutionException, InterruptedException;

    @HttpMethod(description = "获取底部信息")
    public String bottom();

    @HttpMethod(description = "获取产品信息")
    public List<EnterpriseImageDO> productInfo();


    @HttpMethod(description = "产品列表")
    public Page<EnterpriseImageDO> productList(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @HttpParam(name = "name", type = HttpParamType.COMMON, description = "名字") String name
            ) throws ServiceException;

    @HttpMethod(description = "获取一亩田轮播图")
    public String yimutianLunbotu();

}
